﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:OMANE"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" x:Class="StartWindow"
    Title="StartWindow" Height="300" Width="450" ResizeMode="NoResize" Topmost="True" ShowInTaskbar="False" WindowStartupLocation="CenterScreen" WindowStyle="None" AllowsTransparency="True" Background="#00000000">
	<Window.Resources>
        <Color x:Key="CoulDefaultWindowTitleClaire"  A="255" R="125" G="42" B="166" />
        <local:InvertConverter x:Key="InvertConverter"/>
        <Storyboard x:Key="LoadingAnimation" AutoReverse="False" RepeatBehavior="Forever">
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[2].(GradientStop.Offset)" Storyboard.TargetName="textBlock">
				<EasingDoubleKeyFrame KeyTime="0" Value="0.05"/>
				<EasingDoubleKeyFrame KeyTime="0:0:4" Value="0.95"/>
			</DoubleAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="textBlock">
				<EasingColorKeyFrame KeyTime="0" Value="{StaticResource CoulDefaultWindowTitleClaire}"/>
			</ColorAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="textBlock">
				<EasingColorKeyFrame KeyTime="0" Value="{StaticResource CoulDefaultWindowTitleClaire}"/>
			</ColorAnimationUsingKeyFrames>
			<ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="textBlock">
				<EasingColorKeyFrame KeyTime="0" Value="White"/>
			</ColorAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(Brush.RelativeTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" Storyboard.TargetName="textBlock">
				<EasingDoubleKeyFrame KeyTime="0" Value="90"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Offset)" Storyboard.TargetName="textBlock">
				<EasingDoubleKeyFrame KeyTime="0" Value="0.1"/>
				<EasingDoubleKeyFrame KeyTime="0:0:4" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(TextElement.Foreground).(GradientBrush.GradientStops)[0].(GradientStop.Offset)" Storyboard.TargetName="textBlock">
				<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
				<EasingDoubleKeyFrame KeyTime="0:0:4" Value="0.9"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
        <DrawingBrush x:Key="DrawingBrush1" Viewbox="0,0,1,1" ViewboxUnits="Absolute">
        	<DrawingBrush.Drawing>
        		<GeometryDrawing Brush="#FFF4F4F5">
        			<GeometryDrawing.Geometry>
        				<PathGeometry Figures="M131,31">
        					<PathGeometry.Transform>
        						<MatrixTransform Matrix="1,0,0,1,-130.5,-30.5"/>
        					</PathGeometry.Transform>
        				</PathGeometry>
        			</GeometryDrawing.Geometry>
        			<GeometryDrawing.Pen>
        				<Pen Brush="Black" DashCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="10" StartLineCap="Flat" Thickness="1"/>
        			</GeometryDrawing.Pen>
        		</GeometryDrawing>
        	</DrawingBrush.Drawing>
        </DrawingBrush>
        <DrawingBrush x:Key="DrawingBrush2" Viewbox="0,0,101,60.071" ViewboxUnits="Absolute" TileMode="Tile">
        	<DrawingBrush.RelativeTransform>
        		<TransformGroup>
        			<ScaleTransform CenterY="0.5" CenterX="0.5" 
        				ScaleY="{Binding ActualHeight, ConverterParameter=20, Converter={StaticResource InvertConverter}, ElementName=rectangle, Mode=OneWay}" 
        				ScaleX="{Binding ActualWidth, ConverterParameter=20, Converter={StaticResource InvertConverter}, ElementName=rectangle, Mode=OneWay}"/>
        			<SkewTransform CenterY="0.5" CenterX="0.5"/>
        			<RotateTransform CenterY="0.5" CenterX="0.5"/>
        			<TranslateTransform/>
        		</TransformGroup>
        	</DrawingBrush.RelativeTransform>
        	<DrawingBrush.Drawing>
        		<GeometryDrawing>
        			<GeometryDrawing.Brush>
        				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
        					<GradientStop Color="#FFFF9292" Offset="0"/>
        					<GradientStop Color="White" Offset="1"/>
        				</LinearGradientBrush>
        			</GeometryDrawing.Brush>
        			<GeometryDrawing.Geometry>
        				<PathGeometry Figures="M39.751084,22.117593 L83.495671,70.38869 139.44805,26.31508 89.5,10.5 z">
        					<PathGeometry.Transform>
        						<MatrixTransform Matrix="0.98297881458399,0,0,0.952951262272715,-37.5744728134269,-8.50598825386351"/>
        					</PathGeometry.Transform>
        				</PathGeometry>
        			</GeometryDrawing.Geometry>
        			<GeometryDrawing.Pen>
        				<Pen Brush="#FF0079FF" DashCap="Flat" EndLineCap="Flat" LineJoin="Miter" MiterLimit="10" StartLineCap="Flat" Thickness="3"/>
        			</GeometryDrawing.Pen>
        		</GeometryDrawing>
        	</DrawingBrush.Drawing>
        </DrawingBrush>
	</Window.Resources>
	<Window.Triggers>
		<EventTrigger RoutedEvent="FrameworkElement.Loaded">
			<BeginStoryboard x:Name="LoadingAnimation_BeginStoryboard" Storyboard="{StaticResource LoadingAnimation}"/>
		</EventTrigger>
	</Window.Triggers>
    <Grid>
		<Rectangle x:Name="rectangle" Margin="8" Stroke="{DynamicResource DrawingBrush1}" Fill="{DynamicResource DrawingBrush2}" d:IsHidden="True"/>
		<TextBlock x:Name="textBlock" TextWrapping="Wrap" Text="OMANE" FontSize="96" FontFamily="/OMANE_V2;component/Fonts/#Snap ITC" Background="{DynamicResource DrawingBrush1}" OpacityMask="{DynamicResource DrawingBrush2}" Margin="14.34,124.313,0,52.313" d:LayoutOverrides="Width, Height">
			<TextBlock.Foreground>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<LinearGradientBrush.RelativeTransform>
						<TransformGroup>
							<ScaleTransform CenterY="0.5" CenterX="0.5"/>
							<SkewTransform CenterY="0.5" CenterX="0.5"/>
							<RotateTransform CenterY="0.5" CenterX="0.5"/>
							<TranslateTransform/>
						</TransformGroup>
					</LinearGradientBrush.RelativeTransform>
					<GradientStop Color="Black" Offset="0"/>
					<GradientStop Color="White" Offset="1"/>
    			
					<GradientStop Color="Tomato"  Offset="0.582"/>
				</LinearGradientBrush>
			</TextBlock.Foreground>
		</TextBlock>
		<Path Data="M39.751084,22.117593 L63.14935,55.697485 58.06277,34.710052 89.5,10.5 z" HorizontalAlignment="Left" Height="46.071" Margin="39.5,10.429,0,0" Stretch="Fill" Stroke="#FF0079FF" VerticalAlignment="Top" Width="51.902" StrokeThickness="3">
			<Path.Fill>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFFF9292" Offset="0"/>
					<GradientStop Color="White" Offset="1"/>
				</LinearGradientBrush>
			</Path.Fill>
		</Path>
	</Grid>
</Window>
